import { path } from "../../utils/config";
import { setting } from '../../utils/api';
const app = getApp();
Page({
  data: {
    content: ""
  },
  async onLoad(options) {
    let key = options?.key ?? "about";
    const obj = {
      agreement: "用户协议",
      about: "关于我们"
    }
    let title = obj[key];
    wx.setNavigationBarTitle({
      title: title
    });
    let res = await setting({ key });
    let content = res.setting?.content;
    this.setData({ content });
  },
  onShareAppMessage() {
    let poster = app.globalData.poster;
    return {
      path,
      imageUrl: poster
    }
  },
  onShareTimeline() { }
})